home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / Zend / zend_execute_locks.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-19  |  758 b   |  23 lines

  1. #ifndef ZEND_EXECUTE_LOCKS_H
  2. #define ZEND_EXECUTE_LOCKS_H
  3.  
  4. #define PZVAL_LOCK(z)    ((z)->refcount++)
  5. #define PZVAL_UNLOCK(z)    { ((z)->refcount--);                                \
  6.                             if (!(z)->refcount) {                            \
  7.                                 (z)->refcount = 1;                            \
  8.                                 (z)->is_ref = 0;                            \
  9.                                 if (EG(garbage_ptr) == 4) {                    \
  10.                                     zval_ptr_dtor(&EG(garbage)[0]);            \
  11.                                     zval_ptr_dtor(&EG(garbage)[1]);            \
  12.                                     EG(garbage)[0] = EG(garbage)[2];        \
  13.                                     EG(garbage)[1] = EG(garbage)[3];        \
  14.                                     EG(garbage_ptr) -= 2;                    \
  15.                                 }                                            \
  16.                                 EG(garbage)[EG(garbage_ptr)++] = (z);        \
  17.                             }                                                \
  18.                         }
  19.  
  20. #define SELECTIVE_PZVAL_LOCK(pzv, pzn)        if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
  21.  
  22. #endif /* ZEND_EXECUTE_LOCKS_H */
  23.